#ifndef _DRV_LOG_H_
#define _DRV_LOG_H_

#define LOG_LEVEL_INFO_INPUT_LEN                2
#define LOG_LEVEL_FILE_INFO_LEN                 3
#define DEVDRV_HOST_LOG_FILE_CREAT_AUTHORITY    0664
int log_level_file_init(void);
void log_level_file_remove(void);
int log_level_get(void);

/* host ko depmod */
#define PCI_DEVICE_CLOUD 0xa126

#define drv_printk(level, module, fmt, ...) \
    printk(level "[ascend] [%s] [%s %d] " fmt, module, __func__, __LINE__, ##__VA_ARGS__)

#define logflow_printk(level, module, fmt, ...) \
    printk(level "[ascend] [ERROR] [%s] [%s %d] " fmt, module, __func__, __LINE__, ##__VA_ARGS__)

#define drv_err(module, fmt...) logflow_printk(KERN_NOTICE, module, fmt)

#define drv_warn(module, fmt, ...) drv_printk(KERN_WARNING, module, fmt, ##__VA_ARGS__)
#define drv_info(module, fmt, ...) drv_printk(KERN_INFO, module, fmt, ##__VA_ARGS__)
#define drv_debug(module, fmt, ...) drv_printk(KERN_DEBUG, module, fmt, ##__VA_ARGS__)
#define drv_event(module, fmt, ...) drv_printk(KERN_NOTICE, module, fmt, ##__VA_ARGS__)

#endif /* _DRV_LOG_H_ */
